package com.company.manage.system.service;

import com.company.manage.common.base.BaseService;
import com.company.manage.common.persistence.HibernateDao;
import com.company.manage.system.dao.LogDao;
import com.company.manage.system.entity.Log;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by HuangYong on 2016/1/23.
 * desc: 日志管理 Service
 */
@Service
@Transactional(readOnly = true)
public class LogService extends BaseService<Log,Integer> {
    private static final String TAG = "LogService";

    @Autowired
    private LogDao logDao;

    @Override
    public HibernateDao<Log, Integer> getEntityDao() {
        return logDao;
    }

    /**
     * 批量删除日志
     * @param logIds
     */
    @Transactional(readOnly = false)
    public void deleteLog(List<Integer> logIds){
        logDao.deleteBatch(logIds);
    }
}